<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>

<%
    response.setHeader("Cache-Control","no-cache"); //Forces caches to obtain a new copy of the page from the origin server
    response.setHeader("Cache-Control","no-store"); //Directs caches not to store the page under any circumstance
    response.setDateHeader("Expires", 0); //Causes the proxy cache to see the page as "stale"

    if (session.getAttribute("userID") == null) {  
        // User is not logged in.
          response.sendRedirect("index.jsp");
    } else {  
        // User is logged in.  
    }
%>

<%@ include file="header.jsp"%>

    <jsp:useBean id="krogi_bean" scope="page" class="si.sp.socialnetwork.KrogiBean" />

    <div class="contents">
        <div class="left">

            <!-- dodajanje objav -->
            <div id="div_tab_notice">
                <div id="tabs">
                    <ul>
                        <li><a href="#tab_comment"><span class="tab_option">Dodaj komentar</span></a></li>
                        <li><a href="#tab_image"><span class="tab_option">Dodaj sliko</span></a></li>
                    </ul>

                    <div id="tab_comment" class="tab_panel">
                        <!-- fajl za dodajanje komentarja; preusmeri se na moj Profil -->
                        <form action="utrinkiMojProfil.jsp" method="post">
                            <p class="registration_p">
                                <label>Povedati hočem </label><br />
                                <textarea id="write_comment" rows="3" cols="63"></textarea>
                            </p>
                            <p class="registration_p">
                                <label>Vpiši spletno povezavo (če želiš)<br /> <input type="text"
                                    id="url_comment" size="63" maxlength="100" />
                                </label>
                            </p>
                            <p class="registration_p">
                                <!-- javabean za opcije -->
                                <label><br />To lahko vidijo <select name="group" class="selected_group">
                                        <option value="Jaz" selected="selected">Jaz</option>
                                        <jsp:getProperty name="krogi_bean" property="krogi" />
                                        <!--
                                        <option value="1">Znanci</option>
                                        <option value="2">Družina</option>
                                        <option value="3">Zaupni prijatelji</option> -->
                                </select> </label>
                            </p>
                            <div class="button_notice">
                                <input type="submit" class="button_style" name="objavi" value="Objavi" />
                            </div>
                        </form>
                    </div>

                    <div id="tab_image" class="tab_panel">
                        <!-- fajl za dodajanje slike -->
                        <form action="utrinkiMojProfil.jsp" method="post">
                            <p class="registration_p">
                                <label>Vpiši spletno povezavo do slike <br /> <input type="text" id="url_image"
                                    size="63" maxlength="100" />
                                </label>
                            </p>
                            <p class="registration_p">
                                <label>Opis slike (če želiš) </label><br />
                                <textarea id="write_comment" rows="3" cols="63"></textarea>
                            </p>
                            <p class="registration_p">
                                <!-- javabean za opcije -->
                                <label><br />To lahko vidijo <select name="group" class="selected_group">
                                        <option value="Jaz" selected="selected">Jaz</option>
                                        <jsp:getProperty name="krogi_bean" property="krogi" />
                                        <!--
                                        <option value="1" selected="selected">Znanci</option>
                                        <option value="2">Družina</option>
                                        <option value="3">Zaupni prijatelji</option> -->
                                </select> </label>
                            </p>
                            <div class="button_notice">
                                <input type="submit" class="button_style" name="objavi" value="Objavi" />
                            </div>
                        </form>
                    </div>
                </div>
            </div>

        </div>
        <div class="right">
            <div id="menu_buttons">
                <p>
                    <a href="utrinki.jsp" class="div_button">Domov</a>
                </p>
                <p>
                    <a href="utrinkiMojProfil.jsp" class="div_button">Moj profil</a>
                </p>
                <p>
                    <a href="utrinkiMojiPrijatelji.jsp" class="div_button">Moji prijatelji</a>
                </p>
                <p>
                    <a href="utrinkiPoisciPrijatelje.jsp" class="div_button">Poišči prijatelje</a>
                </p>
                <p>
                    <a href="utrinkiDodajNovoObjavo.jsp" class="div_button">Dodaj novo objavo</a>
                </p>
            </div>

            <!-- Fajl za odjavo -->
            <form action="process-logout.jsp" method="post">
                <p>
                    <input type="submit" class="button_style" name="odjava" value="Odjava" />
                </p>
            </form>
        </div>
    </div>

<%@ include file="footer.jsp"%>
